RippleScalerPairGui{

	var posF, valF, theIndex, theDest;
	
	*new{
		arg w, x, y, destination, index;
		var o;
		o = 	super.new;
		o.init(w, x, y, destination, index);
		^o;
	}
	
	updateSc{
	
		if(posF.value != nil && valF.value != nil){
			theDest.getScaler.setVal(theIndex, [posF.value, valF.value])
		}
	}
	
	init{
	
		arg w, x, y, destination, index;
		var tmp;
		
		theDest = destination;
		theIndex = index;
	

	
		posF = 	SCNumberBox(w,Rect(x, y, 22, 20));
		
		
		/*
		tmp = destination.getScaler.getVals.at(index);
		
		if(tmp != nil){
			posF.value = tmp.at(0);
		};
		
		posF.action = {this.updateSc};
		//destination.randAmtGui = s;
		
		*/
		
		valF = 	SCNumberBox(w,Rect(x + 22, y,22,20));
		/* 
		
		if(tmp != nil){
			valF.value = tmp.at(1);
		};
		
		valF.action = { this.updateSc };
		//destination.randAmtGui = s;
		
		*/
	
	}
	
	

}
